Closed ayeshLK closed 2 months ago
public type ConnectionConfig record {|
Region region;
AuthConfig auth;
|};
public enum Region {
US_EAST_1 = "us-east-1"
// other regions
}
public type AuthConfig record {|
string accessKeyId;
string secretAccessKey;
string sessionToken?;
|};
public type Client distinct client object {
remote function getEntitlements(*EntitlementRequest request) returns EntitlementResponse|Error;
};
public type EntitlementsRequest record {|
@constraint:String {
minLength: 1,
maxLength: 255
}
string productCode;
EntitlementFilter filter?;
int maxResults?;
@constraint:String {
pattern: re `\S+`
}
string nextToken?;
|};
public type EntitlementFilter record {|
@constraint:Array {
minLength: 1
}
string[] customerIdentifier?;
@constraint:Array {
minLength: 1
}
string[] dimension?;
|};
public type EntitlementsResponse record {|
Entitlement[] entitlements;
string nextToken?;
|};
public type Entitlement record {|
string customerIdentifier?;
string dimension?;
time:Utc expirationDate?;
string productCode?;
boolean|decimal|int|string value?;
|};
public type Error distinct error;
As the AWS SDK provides more information for the error, updated the error definition for the Ballerina AWS MPE connector.
public type Error error<ErrorDetails>;
public type ErrorDetails record {|
int httpStatusCode?;
string httpStatusText?;
string errorCode?;
string errorMessage?;
|};
Note: If the error is a connection error, the above ErrorDetails
could not be extracted from the underlying exception, hence marked the fields in the ErrorDetails
record as optional.
Description:
Following APIs should be supported:
Related to: #740
[1] - https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html